package com.homework.test1;

public class Demo2 {
    public static void main(String[] args) {

        shuixian();
    }

    private static void shuixian() {
        for (int i = 100; i < 999; i++) {
            int bai = i / 100;
            int shi = i % 100 / 10;
            int ge = i % 100 % 10;

            int i1 = (int) (Math.pow(bai,3) + Math.pow(shi,3) + Math.pow(ge,3));

            if (i==i1){
                System.out.print(i+" ");
            }
        }
    }
}
